Skip to content

TableView sweep batch 2: 45 dialog grids, sorting wired where it's real - #13019

Merged
niksedk merged 2 commits into
mainfrom
experiment/tableview-batch2
Jul 31, 2026
Merged

TableView sweep batch 2: 45 dialog grids, sorting wired where it's real#13019
niksedk merged 2 commits into
mainfrom
experiment/tableview-batch2

Conversation

@niksedk

@niksedk niksedk commented Jul 31, 2026

Copy link
Copy Markdown
Member

Continues #13017 / #13018. Converts every remaining DataGrid except the three with deliberate SortMemberPath sorting (Shortcuts, BatchConvert, FixCommonErrors — batch 3). All 45 dialogs get keyboard-focusable rows, extending the #13015 screen-reader fix.

Sorting decisions

All these grids had CanUserSortColumns = true, but in the DataGrid only plain text columns ever sorted, as a view. TableViewHeaderSorter reorders the backing collection, so it was wired only where list order is presentation-only and nothing consumes collection order:

Wired (12 grids): FontCollector, FindRule, ManualChosenEncoding, PickFontName, PickLayerFilter, PickRuleProfile, PickOnlineSubtitle, and the track lists of PickMatroskaTrack / PickMp4Track / PickTsTrack / PickVobSubLanguage. Typed sort keys (e.g. VobSub # sorts by numeric StreamId, nullable comparers for profile limits), and dialogs where double-tap = OK got an IsInColumnHeader guard so header double-clicks sort instead of accepting.

Dropped (with a code comment stating why, per grid): subtitle/fix previews in timeline order; ASSA/SSA styles + attachments (list order is written into the file/settings); MultipleReplace rule exports; ImportImages/ImportPlainText (order feeds OCR/import); batch queues (BurnIn, SpeechToText, TransparentSubtitles); JoinSubtitles (joins in list order); embedded-track lists (order = output track order); Profiles (saved in order).

Other notable mappings

  • DataGridCheckboxMultiSelect fully retired from these dialogs: extended selection is native, Space-toggle via TableViewExtras.AddSpaceToggle (FixNetflixErrors keeps its "only fixable rows toggle" semantics; RemoveUnicodeCharacters hand-rolls it to coexist with its in-cell ReplaceWith TextBox editor — TableView has no cell editing).
  • TableViewExtras.AttachHomeEndNavigation — Home/End first/last-row jump hoisted into the component (sync + Assa/Ssa windows).
  • AssaStyles' DataGridCollectionView category filter → plain rebuilt ObservableCollection view (the DataGrid package type is gone from these windows).
  • Grid IsFocused checks → IsKeyboardFocusWithin (focus is on row containers now) in CutVideo, PickMatroskaTrack, PickVobSubLanguage — these would have silently broken Enter/Home/End handling.
  • BurnIn/TransparentSubtitles batch grids got MinWidth (star columns have no intrinsic width under SizeToContent).

Known visual delta

  • PointSync's sync-point lists now show their column header (TableView cannot hide headers).

Testing

Builds clean, no new warnings. Smoke-test priorities:

  • A sorted picker: e.g. PickMatroskaTrack (sort by name, pick, preview refresh) and PickOnlineSubtitle (header double-click must sort, not accept)
  • AssaStyles: category filter on the storage grid (rewritten view), multi-select operations
  • FixNetflixErrors: Space toggle skips non-fixable rows
  • RemoveUnicodeCharacters: in-cell ReplaceWith editing + Space in the TextBox types a space
  • CutVideo: Enter/Home/End shortcuts with focus in the segments grid
  • BurnIn/SpeechToText batch queues: status updates land on the right rows

🤖 Generated with Claude Code

niksedk and others added 2 commits July 31, 2026 11:58
Batch 2 of the TableView sweep (#13017, #13018): every remaining DataGrid
with CanUserSortColumns=true but no deliberate SortMemberPath sorting.
Rows take keyboard focus, so the screen-reader fix (#13015) now covers
these dialogs too.

Sorting was decided per grid. In the DataGrid only plain text columns
ever sorted (a view-level sort); TableViewHeaderSorter reorders the
backing collection, so it is wired only where the list order is
presentation-only and nothing consumes collection order:

- Wired (12 grids): FontCollector, FindRule, ManualChosenEncoding,
  PickFontName, PickLayerFilter, PickRuleProfile, PickOnlineSubtitle,
  and the track lists in PickMatroskaTrack/PickMp4Track/PickTsTrack/
  PickVobSubLanguage - with typed keys (numeric stream ids, nullable
  comparers) and header-double-click guards where double-tap accepted
  the dialog.
- Dropped everywhere else: subtitle/fix previews in timeline order,
  ASSA/SSA style and attachment lists (order is written to the file),
  MultipleReplace exports, batch queues, join/split file lists, and
  embedded-track lists (order is the output track order). Each carries
  a code comment with the reason.

Other notable mappings:
- DataGridCheckboxMultiSelect replaced by native extended selection +
  TableViewExtras.AddSpaceToggle (AiReview, ApplyDurationLimits,
  ConvertActors, FixNetflixErrors incl. its canToggle semantics,
  PickLayerFilter, RemoveTextForHearingImpaired; RemoveUnicodeCharacters
  hand-rolls it to coexist with its in-cell ReplaceWith TextBox editor).
- Home/End first/last-row navigation hoisted into
  TableViewExtras.AttachHomeEndNavigation (sync + Assa/Ssa windows).
- AssaStyles' DataGridCollectionView category filter replaced by a plain
  rebuilt ObservableCollection view.
- IsFocused checks on grids became IsKeyboardFocusWithin (focus lands on
  row containers now) in CutVideo/PickMatroskaTrack/PickVobSubLanguage.
- Sync-point lists show a column header now (TableView cannot hide
  headers).

Remaining DataGrids: Shortcuts, BatchConvert and FixCommonErrors (real
SortMemberPath sorting) - batch 3.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A TableView with a star column measured without a width constraint
demands more than the whole window (star columns have no content size to
fall back on - verified headless: 1012px desired in a 1000px window), so
the sync-point lists in their Auto-sized outer columns blew up the middle
panel, squeezed the subtitle grids to slivers and pushed content past the
window edge. Give the lists the fixed 280px width the DataGrid version
had visually.

BurnIn/TransparentSubtitles look like the same pattern but are safe:
their batch column switches to star whenever the batch list is visible.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@niksedk
niksedk marked this pull request as ready for review July 31, 2026 10:17
@niksedk
niksedk merged commit f1295fe into main Jul 31, 2026
0 of 2 checks passed
@niksedk
niksedk deleted the experiment/tableview-batch2 branch July 31, 2026 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant